/*
 * Copyright (c) 2015. For Intelligent Group.
 */

package com.intelligent.ispc.client.event;

import com.google.common.eventbus.Subscribe;
import com.intelligent.ispc.client.core.view.analysis.report.YieldPanel;
import com.intelligent.ispc.client.utils.ApplicationBeanUtils;
import com.intelligent.ispc.client.utils.UIConstant;

/**
 * Created by Lucien.Chen on 2016/10/15.
 */
public class SearchItemOneClickListener {

    /**
     * Subscribe event for click item.
     *
     * @param event SearchItemOneClickEvent
     */
    @Subscribe
    public void click(SearchItemOneClickEvent event) {

        if (event.getKey().equals(UIConstant.MODULE_YIELD)) {
            ApplicationBeanUtils.getBean(YieldPanel.class).fireSelectOneItem();
        }
    }
}
